<template>
    <div class="doctor_cell" @click="lookDetail">
        <div class="avatar">
            <van-image :src="IMAGEURL + info.brandLogo" class="img" lazy-load v-if="info.brandLogo" :alt="`${info.materialName}价格表`" />
            <van-image :src="require('@/assets/images/inquire/avatar2.png')" class="img" lazy-load :alt="`${info.materialName}价格表`" v-else />
        </div>
        <div class="info">
            <div class="title">
                <span class="name">{{ info.materialName }}</span>
                <img src="@/assets/images/inquire/hot.png" class="img" alt="" v-if="hot && index < 3" />
            </div>
            <div class="rate">
                <span class="num">产地：{{ info.materialOriginPlace }}</span>
            </div>
            <div class="address">
                <span>所属公司：{{ info.belongCompany }}</span>
            </div>
        </div>
</div>
</template>
<script>
import config from "@/http/config";
export default {
    name: 'SearchMaterial',
    props: {
        info: {
            type: Object,
            default: function () {
                return {}
            }
        },
        index: {
            type: Number,
            default: 0,
        },
        hot: {
            type: Boolean,
            default: true
        }
    },
    data() {
        return {
            IMAGEURL: config.IMAGEURL,
        }
    },
    created() {

    },
    methods: {
        // 查看详情
        lookDetail() {
            let id = this.info.id;
            this.$router.push({
                path: `/inquire/material/${id}`,
            })
        }
    }
}
</script>
<style lang="less" scoped>@import './index.less';</style>